package cz.zcu.sefler.mois.data.model;

/**
 * Trida jedne vety rozhovoru.
 * 
 * @author Vojtech Sefler
 * 
 */
public class Sentence implements Comparable<Sentence> {
  private int    id;

  /**
   * Cislo rozhovoru, ve kterem se tato veta nachazi.
   */
  private int    monitorId;

  /**
   * Druh vety (oznamovaci, rozkazovaci, doplnovaci, zjistovaci).
   */
  private String type;

  /**
   * Textovy obsah vety.
   */
  private String content;

  public Sentence() {
  }

  public Sentence(String content, String type) {
    this.content = content;
    this.type = type;
  }

  public int getId() {
    return id;
  }

  public void setId(int id) {
    this.id = id;
  }

  public int getMonitorId() {
    return monitorId;
  }

  public void setMonitorId(int monitorId) {
    this.monitorId = monitorId;
  }

  public String getType() {
    return type;
  }

  public void setType(String type) {
    this.type = type;
  }

  public String getContent() {
    return content;
  }

  public void setContent(String content) {
    this.content = content;
  }

  /**
   * Metoda pro porovnani vet dle identifikatoru.
   */
  @Override
  public int compareTo(Sentence arg0) {
    if (this.getId() > arg0.getId()) {
      return 1;
    } else if (this.getId() < arg0.getId()) {
      return -1;
    }

    return 0;
  }

}
